package DesignMode.Flyweight;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}16:50
 */
public class Test {
    public static void main(String[] args) {
        int extrinsicstate = 22;

        FlyweightFactory factory = new FlyweightFactory();

        Flyweight fx = factory.GetFlyweight("X");
        fx.operation(extrinsicstate--);
        Flyweight fy = factory.GetFlyweight("Y");
        fy.operation(extrinsicstate--);
        Flyweight fz = factory.GetFlyweight("Z");
        fz.operation(extrinsicstate--);
        Flyweight uf = new UnsharedConcreteFlyweight();
        uf.operation(extrinsicstate);


    }
}
